home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / oecc_106.arc / LOCATE.OEC < prev    next >
Encoding:
INI File  |  1987-09-20  |  2.9 KB  |  104 lines

  1. [lf][repeat][tab][4][[Locate] Demo
  2.  
  3. The purpose of this file is to demonstrate the use of the "advanced" OECL
  4. features available in OECC version 1.02 and higher.
  5.  
  6. First of all, the new [[locate] token will place the cursor into a position
  7. of your own choice. The word "locate" was taken from the BASIC language.
  8. The [[locate] token _MUST_ be followed by screen coordinates, showing first
  9. the row (line) then the column where you wish to position the cursor.
  10.  
  11. The position must be expressed by a binary byte, not an ASCII representation
  12. thereof. Advanced OECL allows you to achieve the same by turning the
  13. coordinates into tokens (i.e. placing them into square brackets).
  14.  
  15. Example:
  16.  
  17. To move the cursor to the second column of the fifteenth line (row), you
  18. need to enter:
  19.  
  20.     [[locate][[15][[2]
  21.  
  22. Please note that there may be no blanks between the tokens. But you may
  23. use blanks or even carriage returns INSIDE the token, e.g.,
  24.  
  25.     [[ locate ][[
  26.  
  27. 15
  28.  
  29. ][[
  30.  
  31. 2    ]
  32.  
  33. This is what happens if you compile it with OECC:
  34.  
  35. [enter][cls][ locate ][
  36.  
  37. 15
  38.  
  39. ][
  40.  
  41. 2    ]This should appear in the second column of the 15th line...
  42.  
  43.  
  44. Now let us see how to use [[ repeat ]:
  45.  
  46. While OECC will automatically compress any sequence of four or more
  47. identical characters, you may achieve the same effect using the [[repeat]
  48. token. For example, to print out 15 equal signs (=), you can either
  49. type out 15 equal signs, or enter:
  50.  
  51.     [[repeat]=[[15]
  52.  
  53. Again there may be no blanks between the tokens. Here is what you get:
  54.  
  55.     [repeat]=[15]
  56.  
  57. To print out characters that do not appear on your keyboard, try something
  58. like this:
  59.  
  60.     [[repeat][[1][[15]
  61.  
  62. This should give you 15 smiling faces:
  63.  
  64.     [repeat][1][15]
  65.  
  66. IBM users can create fancy graphics screens with this command, but beware
  67. that your non-IBM callers will get junk....
  68.  
  69. One word of warning!!! Do not use [[repeat] with [[26]. [[26] compiles
  70. to ^Z which makes the current version of Opus (1.03 as of this writing)
  71. think it came to the end of the file. If you really need to repeat a
  72. character 26 times, type it once, then repeat it 25 times. For example, this
  73. will give you 26 ='s:
  74.  
  75.     =[[repeat]=[[25]
  76.  
  77. Like this:
  78.  
  79.     =[repeat]=[25]
  80.  
  81. Using [[repeat] with [[lf] can be an efficient way of clearing the screen
  82. without using [[cls] which some non-ANSI systems may not understand. To see
  83. what I mean watch what happens if you enter:
  84.  
  85.     [[cr][[ repeat ][[ lf ][[ 30 ]
  86. [enter]
  87.     [cr][ repeat ][ lf ][ 30 ]
  88.  
  89. Did that clear your screen right?
  90.  
  91. The rest of this demo is for IBM-ers only. Check out this code, think
  92. what it's going to give you, then hit ENTER to see the result.
  93.  
  94. [[tab][[213][[repeat][[205][[30][[187][[cr][[lf][[tab][[179][[repeat] [[30][[186]
  95. [[tab][[192][[repeat][[196][[30][[189]
  96.  
  97. [enter]
  98.  
  99. OK. Here's the result:
  100.  
  101. [tab][213][repeat][205][30][187][cr][lf][tab][179][repeat] [30][186]
  102. [tab][192][repeat][196][30][189]
  103.  
  104.